#ifndef __MYDB_HPP
#define __MYDB_HPP

#include <db_cxx.h>
#include <string>

class MyDb
{
public:
    MyDb();

    bool OpenDb(const std::string& dbFileName);

    // Our destructor just calls our private close method.
    ~MyDb() { close(); }

    bool AddData(const std::string& MD5);
    bool DelData(const std::string& MD5);
    bool RetrievalData(const std::string& MD5);
    //     inline Db &getDb() {return db_;}
private:
    void close();

private:
    Db          db_;
    std::string dbFileName_;
    u_int32_t   cFlags_;
};

#endif
